import request from "../utils/request";
// 企业管理查询的 简历详情 参数不一样 
export const fetchResume = query => {
    return request.post('/zsrencai/api/company/resume-deliver/update-deliverStu/ById/', query)
}
// / 人才库、企业首页查询的 简历详情 与上面参数不一样 
export const fetchResumeById = query => {
    return request.get(`/zsrencai/api/company/resume/get/detail/${query}`)
}


// 邀请面试
export const inviteInterview = query => {
    return request.post('/zsrencai/api/company/resume/saveInsertResume', query)
}
// 获取公司职位列表
export const getJobList = () => {
    return request.post('/zsrencai/api/company/job/list/company/id')
}
// 简历查询 /zsrencai/api/company/resume/queryResume
export const queryResume = (param) => {
    return request.post('/zsrencai/api/company/resume/queryResume', param)
};
export const getDict = (param) => {
    return request.get('/zsrencai/api/sys/admin/dict/get/' + param)
};
export const getDictTrade = () => {
    return request.get('/zsrencai/api/sys/admin/tc/find/tree')
};
export const getDictJob = () => {
    return request.get('/zsrencai/api/sys/admin/jc/find/tree')
};
// //标为简历为有意向
// export const updateMsgIntention = (param)=>{
//     return request.post('/zsrencai/api/sys/admin/personMsg/updateMsgIntention',param)
// };
// //标为简历不合适
// export const updateMsgInappropriate = (param)=>{
//     return request.post('/zsrencai/api/sys/admin/personMsg/updateMsgInappropriate',param)
// };
// //邀请面试
// export const updateMsgInvited = (param)=>{
//     return request.post('/zsrencai/api/sys/admin/personMsg/updateMsgInvited',param)
// };
// //标记为待定
// export const updateStatusByUserId = (param)=>{
//     return request.post('/zsrencai/api/person/resume/deliver/updateStatusByUserId',param,{headers: {'Content-Type': 'application/x-www-form-urlencoded'}})
// };
// //删除投递记录
// export const updateDeleteByUserId = (param)=>{
//     return request.post('/zsrencai/api/person/resume/deliver/updateDeleteByUserId',param,{headers: {'Content-Type': 'application/x-www-form-urlencoded'}})
// };
// personl/detail
export const getResume = query => {
    return request.post('/zsrencai/api/person/resume/selectResPartars', query)
};
// 简历操作
export const handleResume = query => {
    return request.post('/zsrencai/api/company/resume/insertOrUpdate/deliver', query)
}
// 删除简历
export const deleteResume = query => {
    return request.post('/zsrencai/api/company/resume/delete/deliver-id', query)
}
// 简历下载增加次数接口
export const downloadCount = query => {
    return request.put('/zsrencai/api/company/resume/save-batch/resume-download', query)
}
// 收藏简历 /zsrencai/api/company/resume-collect/insert/resume-collect
export const resumeCollect = query => {
    return request.post('/zsrencai/api/company/resume-collect/insert/resume-collect', query)
}
// 取消收藏 /zsrencai/api/company/resume-collect/resume-collect/{id}
export const resumeUncollect = id => {
    return request.delete('/zsrencai/api/company/resume-collect/resume-collect/' + id, { data: {} })
}
// 简历求职情况  /zsrencai/api/company/resume-deliver/select/job-condition
export const jobCondition = query => {
    return request.post('/zsrencai/api/company/resume-deliver/select/job-condition', query)
}


// 二期 ：收藏的简历
export const collectResume = query => {
    return request.post('/zsrencai/api/company/resume-collect/list/page', query)
}
// 举报 /zsrencai/api/company/resume/complaint/insert
export const report = query => {
    return request.post('/zsrencai/api/company/resume/complaint/insert', query)
}

// 建立聊天连接
export const getConnection = query => {
    return request.post('/zsrencai/ws/chat/insert', query)
}
